import request from '@/utils/request'

// 查询协议文本列表
export function listAgreement(query) {
  return request({
    url: '/member/agreement/list',
    method: 'get',
    params: query
  })
}

// 查询协议文本详细
export function getAgreement(id) {
  return request({
    url: '/member/agreement/' + id,
    method: 'get'
  })
}

// 新增协议文本
export function addAgreement(data) {
  return request({
    url: '/member/agreement',
    method: 'post',
    data: data
  })
}

// 修改协议文本
export function updateAgreement(data) {
  return request({
    url: '/member/agreement',
    method: 'put',
    data: data
  })
}

// 删除协议文本
export function delAgreement(id) {
  return request({
    url: '/member/agreement/' + id,
    method: 'delete'
  })
}

// 导出协议文本
export function exportAgreement(query) {
  return request({
    url: '/member/agreement/export',
    method: 'get',
    params: query
  })
}